<!DOCTYPE html>
<html lang="en" style="height: 100%;">
<head>
    <meta charset="UTF-8">
    <title>认养订单</title>
    <style>
        .hander_zx{font-size:18px;padding-left: 10px;margin-top:5px;}.conten{background:#fff;margin-top:10px}.conten ul{overflow:hidden;padding:0;margin:0;border-bottom:1px solid #e5e5e5}.conten_floet li{float:left;list-style:none;line-height:45px;text-align:center;width:100px;cursor:pointer;color:#212121}.active{color:#14d882!important;border-bottom:3px solid #14d882}.push_fx li{float:left;font-size:14px;list-style:none;width:8.7%;text-align:center;background:#f8f8f8;line-height:45px;color:#1f1f1f}.lick_push li{float:left;font-size:14px;width:8.7%;text-align:center;line-height:45px;list-style:none;color:#616161}.lick_push li:last-child{color:#14d882!important}.lick_push li:last-child span:nth-child(1){margin-right:5px}.lick_push li:last-child span{cursor:pointer}.w_node{width:13%!important}
        .ad_ck{cursor: pointer;}
    </style>
    <link rel="stylesheet" href="../css/paging.css">
</head>
<body style="height:100%;overflow-x: hidden">
<!--//hander-->
<div class="hander_zx">认养订单</div>
<!--内容-->
<div class="conten" style="overflow-x: hidden">
    <ul class="conten_floet">
        <li class="active push_ry" data-id="1">全部</li>
        <li class="push_ry" data-id="3">待收益</li>
        <li class="push_ry" data-id="2">认养中</li>
        <li class="push_ry" data-id="4">已结息</li>
    </ul>
    <div>
        <ul class="push_fx" style="background:#F8F8F8;width: 100%;">
            <li class="w_node">认养时间</li>
            <li>认养人</li>
            <li>认养资金</li>
            <li>年率化</li>
            <li>认养数量</li>
            <li>认养周期</li>
            <li>认养收益</li>
            <li>已消费</li>
            <li>订单状态</li>
            <li>结息时间</li>
            <li>操作</li>
        </ul>
    </div>
    <!--//数据展示-->
    <div id="push_min">
    </div>
    <div class="box" id="box" style="display:none;"></div>
</div>
</body>
<script src="https://cdn.bootcss.com/jquery/2.1.1-rc2/jquery.min.js"></script>
<script src="../js/paging.min.js"></script>
<script>
    'use strict';$(function(){function query(w,p){$.ajax({type:'post',url:'/getInvestOrders',dataType:'json',contentType:"application/json",data:JSON.stringify({currentPage:1,pageCount:24,state:w}),success:function success(data){c(data.totalCount,w,"/getInvestOrders",p)}})}query(null);$(".push_ry").on('click',function(){$(this).siblings().removeClass("active");$(this).addClass("active");if($(this).attr("data-id")=="1"){query(null,1);return}if($(this).attr("data-id")=="2"){query(3,2);return}if($(this).attr("data-id")=="3"){query(2,3);return}if($(this).attr("data-id")=="4"){query(4,4);return}});function c(data,to,url_to,k){if(typeof data==='number'&&data>0){$("#box").css("display","block")}else{$("#box").css("display","none")}var total=Math.ceil(data/24);$('#box').paging({initPageNo:1,totalPages:total,totalCount:'合计'+data+'条数据',slideSpeed:600,jump:true,callback:function callback(page){$.ajax({type:'post',url:url_to,dataType:'json',contentType:"application/json",async:false,data:JSON.stringify({currentPage:page,pageCount:24,state:to}),success:function success(data){var html='';for(var i=0;i<data.rows.length;i++){html+='\n                                  <ul class="lick_push">\n                                       <li class="w_node">'+data.rows[i].order_time+'</li>\n                                       <li>'+data.rows[i].username+'</li>\n                                       <li>'+data.rows[i].order_money+'</li>\n                                       <li>'+(data.rows[i].return_rate+"%")+'</li>\n                                       <li>'+data.rows[i].amount+'</li>\n                                       <li>'+(data.rows[i].time_limit+"个月")+'</li>\n                                       <li>'+data.rows[i].income+'</li>\n                                       <li>'+data.rows[i].cost+'</li>\n                                       <li>'+(data.rows[i].state==2?"待收益":data.rows[i].state==3?"收益中":"已结息")+'</li>\n                                       <li>'+data.rows[i].end_time+'</li>\n                                       <li data-id="'+data.rows[i].code+'" class="ad_ck">\u67E5\u770B</li>\n                                   </ul>\n                                   '}$("#push_min").html(html)}})}})}$("#push_min").on('click','.ad_ck',function(){$.ajax({type:'post',url:"/getOrderht",dataType:'json',contentType:"application/json",async:false,data:JSON.stringify({code:$(this).attr("data-id")}),success:function success(data){$('.ry_rq',window.parent.document).text(data.rows.order_time);$('.ry_uername',window.parent.document).text(data.rows.username);$('.ry_dj',window.parent.document).text(data.rows.price);$('.ry_sl',window.parent.document).text(data.rows.amount+data.rows.unit+data.rows.type);$('.ry_zq',window.parent.document).text(data.rows.time_limit+"个月");$('.ry_nhl',window.parent.document).text(data.rows.return_rate+"%");$('.ry_je',window.parent.document).text(data.rows.income);$('.ry_ks',window.parent.document).text(data.rows.order_time);$('.ry_sy',window.parent.document).text(data.rows.end_time);$('.ry_zt',window.parent.document).text(data.rows.state==3?"收益中":"已完成");$('.ry_name',window.parent.document).text(data.rows.username);$('.phone_ry',window.parent.document).text(data.rows.phone);$('.idcard_ry',window.parent.document).text(data.rows.idcard);$('.ry_zf',window.parent.document).text(data.rows.paytype=="weChat"?"微信支付":"新浪支付");$('.ry_lsh',window.parent.document).text(data.rows.htcode);$('.ry_ddh',window.parent.document).text(data.rows.code);$('#adoption',window.parent.document).css("display","block")}})})});
</script>
</html>